<!--
 * @Descripttion: 
 * @Author: lx
 * @Date: 2022-06-10 10:47:52
 * @LastEditTime: 2022-06-24 12:51:18
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Document</title>
    <script src="./common.js"></script>
</head>
<body>
<button id="test">测试防抖</button>
<script>
    document.querySelector("#test").addEventListener("click", () => {
        alert("密码错误");
    });

    // reciveFromVue((res) => {
    //   const { content, type, params } = res;
    //   if (res.type === "trigger") {
    //     const e = eval(content);
    //     params ? new e(params) : new e();
    //   }
    // });

    receiveFromVue((res) => {
        console.log(res);
    });

    function fun1(str) {
        console.log("通过eval触发了fun1方法，参数为" + str);
    }

    // setTimeout(() => {
    //   postToVue({
    //     type: "changeHistory",
    //     content: JSON.stringify({ url: "/about" }),
    //   });
    // }, 2000);
</script>
</body>
</html>
